<?php include $this->header();?>
<?php if(false) {?>
<link rel="stylesheet" rev="stylesheet" href="../../../images/admincp/style.css" type="text/css" media="all" />
<?php }?>
<div class="wrap">
<form method="post" enctype="application/x-www-form-urlencoded" target="_self" onsubmit="return Validator.Validate(this)">
<div class="bd p1 mt">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="rank">
    <tr class="th">
        <td colspan="2" align="left" valign="middle"> &nbsp;基本选项</td>
        </tr>
    <tr>
        <td width="140" align="right" valign="middle">分类名称</td>
        <td><input name="cat_name" type="text" class="text-box" id="cat_name" onblur="Validator.check(this)" size="45" dataType="Require" msg="请填写菜单名称" /> <b class="red">*</b></td>
    </tr>
    <tr>
        <td align="right" valign="middle">上级分类</td>
        <td>
          <select name="cat_parent_id" id="cat_parent_id">
              <option value="0">请选择上级分类</option>
			  <?php foreach ($_cats as $_cat) {?>
              <option value="<?=$_cat['cat_id']?>" <?php if(!empty($_GET['cat_parent_id']) && $_GET['cat_parent_id'] == $_cat['cat_id']){?>selected="selected"<?php } if(!empty($_GET['cat_app']) && $_GET['cat_app'] != $_cat['cat_app']){?> disabled="disabled" <?php }?> ><?=$_cat['icon']?><?=$_cat['cat_name']?></option>
              <?php }?>
              
          </select>
          <span class=" note">（不选择则为顶级菜单）</span></td>
    </tr>
    <?php if(empty($_GET['app_id'])) { ?>
    <tr>
        <td width="140" align="right" valign="middle">应用</td>
        <td>
            <select name="cat_app" id="cat_app" dataType="Require" msg="请选择应用" onblur="Validator.check(this)">
                <option value="">请选择应用</option>
                <?php foreach($useCatApps as $catApp){?>
                <option value="<?=$catApp['app_id']?>"><?=$catApp['app_name']?></option>
                <?php }?>
            </select>
        </td>
    </tr>
    <?php } else { ?>
    <input type="hidden" name="cat_app" value="<?=$_GET['app_id']?>" />
    <?php }?>
    <tr>
        <td align="right" valign="middle">排序</td>
        <td><input name="cat_order" type="text" class="text-box" id="cat_order" size="5" />
            <span class="note">（数字越小，排序越靠前）</span></td>
    </tr>
    <tr>
        <td align="right" valign="middle">URL</td>
        <td><input name="cat_order" type="text" class="text-box" id="cat_order" size="45" />
            <span class="note">（如果设置，则点击后将跳转到该url）</span></td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">是否启用</td>
        <td>
            <input name="cat_enabled" value="1" checked="checked" type="radio" />
            是
    <input name="cat_enabled" value="0" type="radio" />
            否
            
            <span class="note">（选择&quot;是&quot;，则该分类下得到商品在前台显示，选择&quot;否&quot;，则不显示）</span></td>
    </tr>
    <tr>
        <td align="right" valign="middle">是否在导航栏显示</td>
        <td><input name="cat_nav_show" value="1" checked="checked" type="radio" />
            是
<input name="cat_nav_show" value="0" type="radio" />否 </td>
    </tr>
    <tr>
        <td align="right" valign="middle" class="nobd">&nbsp;</td>
        <td class="nobd"><input class="btn" type="submit" value="添加" />
            <input name="重置" type="reset" class="btn" value="重置" /></td>
    </tr>
</table>
</div>
<div class="bd p1 mt">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="rank">
    <tr class="th">
        <td colspan="2" align="left" valign="middle"> &nbsp;SEO 设置</td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">页面标题</td>
        <td><input name="cat_slug" type="text" class="text-box" id="cat_slug" size="45" /></td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">页面关键词</td>
        <td><input name="cat_keyword" type="text" class="text-box" id="cat_keyword" size="45" /></td>
    </tr>
    <tr>
        <td width="140" align="right" valign="middle">页面描述</td>
        <td>
            <textarea name="cat_description" id="cat_description" cols="42" rows="5"></textarea>
        </td>
    </tr>
    <tr>
        <td align="right" valign="middle" class="nobd">&nbsp;</td>
        <td class="nobd"><input class="btn" type="submit" value="添加" />
            <input name="重置" type="reset" class="btn" value="重置" /></td>
    </tr>
</table>
</div>
</form>
</div>
<?php include $this->footer();?>